var fs = require('fs');
var zlib = require('zlib');

var rds = fs.createReadStream('data.rar');
var unzip = zlib.createGunzip();
var wrs = fs.createWriteStream('data.txt');

rds.pipe(unzip).pipe(wrs);

console.log('文件解压完成！');